import { createRouter, createWebHistory, createWebHashHistory } from 'vue-router'
import home from '../components/home.vue'
import login from '../views/login.vue'
import chat from '../views/chat.vue'
import copywriting from '../views/copywriting.vue'
import picture from '../views/picture.vue'
import file from '../views/file.vue'
import TranslationSelect from '../views/TranslationSelect.vue'
import knowledgeBase from '../views/knowledgeBase.vue'
import collect from '../views/collect.vue'
import contactUs from '../views/contactUs.vue'
import chatgpt from '../views/chatgpt.vue'

const routes = [
  {
    path: '/',
    name: 'login',
    component: login
  },
  {
    path: '/AI',
    name: 'AI',
    component: home,
    children: [
      {
        path: '/AI/chat',
        component: chat
      },
      {
        path: '/AI/copywriting',
        component: copywriting
      },
      {
        path: '/AI/picture',
        component: picture
      },
      {
        path: '/AI/file',
        component: file
      },
      {
        path: '/AI/TranslationSelect',
        component: TranslationSelect
      },
      {
        path: '/AI/knowledgeBase',
        component: knowledgeBase
      },
      {
        path: '/AI/collect',
        component: collect
      },
      {
        path: '/AI/contactUs',
        component: contactUs
      },
    ]
  },

  
]

const router = createRouter({
  // history: createWebHistory(),
  history : createWebHashHistory(),
  routes
})
 
export default router
